package com.tuo51.evaluate.domain.appusers;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.tuo51.evaluate.domain.business.Order;
import com.tuo51.core.domain.staffs.Staff;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@Entity
@Table(name = "pay_wx_order")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer"})
@EqualsAndHashCode(callSuper = false)
public class PayWxOrder extends Order {

	@Column(name = "user_id")
	private String userId;

	@JsonIgnore
	@OneToOne
	@JoinColumn(name = "user_id", insertable = false, updatable = false)
	private Staff user;

	@Column(name = "order_no")
	private String orderNo;

	@Column(name = "app_id")
	private String appId;

	@Column(name = "mch_id")
	private String mchId;

	@Column(name = "transaction_id")
	private String transactionId;

	@Column(name = "result_code")
	private String resultCode;

	@Column(name = "open_id")
	private String openId;

	@Column(name = "trade_type")
	private String tradeType;

	@Column(name = "bank_type")
	private String bankType;

	@Column(name = "total_fee")
	private Integer totalFee;

	@Column(name = "promo_code_id")
	private String promoCodeId;

	@JsonIgnore
	@OneToOne
	@JoinColumn(name = "promo_code_id", insertable = false, updatable = false)
	private PromoCode promoCode;

	private String attach;

	@Column(name = "time_end")
	private String timeEnd;

	@Column(name = "product_issue_status")
	private Integer productIssueStatus;

	@Column(name = "create_time")
	private java.util.Date createTime;

	private Integer status;

}
